You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@amplitude/experiment-core

Package Overview
Dependencies
Maintainers
20
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/experiment-core

Amplitude Experiment evaluation JavaScript implementation.

0.6.0
Source
npmnpm
Version published
Weekly downloads
323K
-20.77%
Maintainers
20
Weekly downloads
 
Created

What is @amplitude/experiment-core?

@amplitude/experiment-core is a JavaScript library that allows developers to integrate Amplitude's experimentation and feature flagging capabilities into their applications. It provides tools to manage and evaluate experiments, enabling data-driven decision-making for product features.

What are @amplitude/experiment-core's main functionalities?

Initialize the Experiment Client

This feature allows you to initialize the Experiment Client with your API key, which is necessary to interact with Amplitude's experimentation services.

const { ExperimentClient } = require('@amplitude/experiment-core');
const client = new ExperimentClient('YOUR_API_KEY');

Fetch Variants

Fetches the variants for a given user. This is useful for determining which variant of an experiment a user should see.

client.fetch({ user_id: 'user123' }).then(variants => {
  console.log(variants);
});

Track Exposure

Tracks the exposure of a user to a specific variant. This is important for measuring the impact of different variants in your experiments.

client.track({ user_id: 'user123', variant: 'variantA' });

Other packages similar to @amplitude/experiment-core

Keywords

experiment

FAQs

Package last updated on 25 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts